package com.example.lotterysystem.service.enmus;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor //全参构造
@Getter
public enum ActivityUserStatusEnum {
    INIT(1,"初始化"),

    COMPLETED(2,"已被抽取");

    private final Integer code;

    private final String message;

    //根据传入的字符串名称来查找并返回对应的 ActivityPrizeStatusEnum 枚举实例
    public static ActivityUserStatusEnum forName(String name) {
        for (ActivityUserStatusEnum activityUserStatusEnum:ActivityUserStatusEnum.values()) {
            if(activityUserStatusEnum.name().equalsIgnoreCase(name)) {
                return activityUserStatusEnum;
            }
        }
        return null;
    }
}
